import React, { Component } from 'react'
import { NavLink } from 'react-router-dom'
export default class RouterLink extends Component {
  render () {
    // console.log(this.props, 'link')
    const { routes, activeCss } = this.props
    console.log(this.props, '1111')
    return (
      <div>
        {/* 渲染导航 */}
        {
          routes.map((item, index) => {
            if (!item.title) return false
            return <NavLink
              to={item.path}
              key={index}
              activeClassName={activeCss}
            >
              {item.title}
            </NavLink>
          })
        }
      </div>
    )
  }
}
